//
//  PictureModel.swift
//  SwiftStudy
//
//  Created by wangyuxiang on 2018/2/6.
//  Copyright © 2018年 chang. All rights reserved.
//

import UIKit

class PictureModel: NSObject {
    var url: String = ""
    var desc:String = ""
    
    var width: CGFloat = 0.0
    var height: CGFloat = 0.0
    
    func encode(dic: [String: AnyObject]) {
        self.url = dic["image_url"] as! String
        self.desc = dic["desc"] as! String
        self.width = CGFloat.init((dic["image_width"]?.floatValue)!)
        self.height = CGFloat.init((dic["image_height"]?.floatValue)!)
    }
}
